/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package apptodate;

import java.io.File;
import java.io.IOException;
import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *@author Revamp Group
 * Bacalanmo, Yra
 * Damot, Peter Paul
 * Delos Santos, Denmark
 * Flores, Jann Marie
 * Ingco, Chester
 * Lao, Charles
 * Ligos, Klarence
 * Navarro, Frances Joffany
 * Pamintuan, Louisa
 * Sanchez, Ashley
 * Toledo, Jazelle Mae
 * Venturina, Kevin 
 */

public class YearlyView extends javax.swing.JFrame {

    public int year;
    public String stringPath = "";
    public int d[] = new int[42];
    public String[] s = new String[42];
    public int i;

    /**
     * Creates new form YearlyView
     */
    public YearlyView() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        titlePanel = new javax.swing.JPanel();
        yearButton = new javax.swing.JButton();
        monthButton = new javax.swing.JButton();
        dayButton = new javax.swing.JButton();
        settings = new javax.swing.JButton();
        modifyAdd = new javax.swing.JButton();
        yearLabel = new javax.swing.JLabel();
        yearRightArrow = new javax.swing.JButton();
        leftYearArrow = new javax.swing.JButton();
        jScrollPane13 = new javax.swing.JScrollPane();
        String[] dow = new String[7]; //Days of Week
        if(getStartingWeek() == 0){
            dow[0] = "Sn";
            dow[1] = "M";
            dow[2] = "T";
            dow[3] = "W";
            dow[4] = "Th";
            dow[5] = "F";
            dow[6] = "S";
        }else if(getStartingWeek() == 1){
            dow[0] = "M";
            dow[1] = "T";
            dow[2] = "W";
            dow[3] = "Th";
            dow[4] = "F";
            dow[5] = "S";
            dow[6] = "Sn";
        }else if(getStartingWeek() == 2){
            dow[0] = "T";
            dow[1] = "W";
            dow[2] = "Th";
            dow[3] = "F";
            dow[4] = "S";
            dow[5] = "Sn";
            dow[6] = "M";
        }else if(getStartingWeek() == 3){
            dow[0] = "W";
            dow[1] = "Th";
            dow[2] = "F";
            dow[3] = "S";
            dow[4] = "Sn";
            dow[5] = "M";
            dow[6] = "T";
        }else if(getStartingWeek() == 4){
            dow[0] = "Th";
            dow[1] = "F";
            dow[2] = "S";
            dow[3] = "Sn";
            dow[4] = "M";
            dow[5] = "T";
            dow[6] = "W";
        }else if(getStartingWeek() == 5){
            dow[0] = "F";
            dow[1] = "S";
            dow[2] = "Sn";
            dow[3] = "M";
            dow[4] = "T";
            dow[5] = "W";
            dow[6] = "Th";
        }else if(getStartingWeek() == 6){
            dow[0] = "S";
            dow[1] = "Sn";
            dow[2] = "M";
            dow[3] = "T";
            dow[4] = "W";
            dow[5] = "Th";
            dow[6] = "F";
        }
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        janTable = new javax.swing.JTable();
        janLabel = new javax.swing.JLabel();
        febLabel = new javax.swing.JLabel();
        marLabel = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        febTable = new javax.swing.JTable();
        jScrollPane3 = new javax.swing.JScrollPane();
        marTable = new javax.swing.JTable();
        aprLabel = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        aprTable = new javax.swing.JTable();
        mayLabel = new javax.swing.JLabel();
        junLabel = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        mayTable = new javax.swing.JTable();
        jScrollPane6 = new javax.swing.JScrollPane();
        junTable = new javax.swing.JTable();
        julLabel = new javax.swing.JLabel();
        jScrollPane7 = new javax.swing.JScrollPane();
        julTable = new javax.swing.JTable();
        augLabel = new javax.swing.JLabel();
        sepLabel = new javax.swing.JLabel();
        jScrollPane8 = new javax.swing.JScrollPane();
        augTable = new javax.swing.JTable();
        jScrollPane9 = new javax.swing.JScrollPane();
        sepTable = new javax.swing.JTable();
        octLabel = new javax.swing.JLabel();
        jScrollPane10 = new javax.swing.JScrollPane();
        octTable = new javax.swing.JTable();
        novLabel = new javax.swing.JLabel();
        jScrollPane11 = new javax.swing.JScrollPane();
        novTable = new javax.swing.JTable();
        jScrollPane12 = new javax.swing.JScrollPane();
        decTable = new javax.swing.JTable();
        decLabel = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        titlePanel.setBackground(new java.awt.Color(34, 34, 34));
        titlePanel.setForeground(new java.awt.Color(240, 240, 240));
        titlePanel.setFont(new java.awt.Font("Aldhabi", 0, 18)); // NOI18N

        yearButton.setBackground(new java.awt.Color(29, 114, 239));
        yearButton.setContentAreaFilled(false);
        yearButton.setOpaque(true);
        yearButton.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        yearButton.setForeground(new java.awt.Color(240, 240, 240));
        yearButton.setText("YEAR");
        yearButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        yearButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                yearButtonActionPerformed(evt);
            }
        });

        monthButton.setBackground(new java.awt.Color(34, 34, 34));
        monthButton.setContentAreaFilled(false);
        monthButton.setOpaque(true);
        monthButton.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        monthButton.setForeground(new java.awt.Color(240, 240, 240));
        monthButton.setText("MONTH");
        monthButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        monthButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                monthButtonActionPerformed(evt);
            }
        });

        dayButton.setBackground(new java.awt.Color(34, 34, 34));
        dayButton.setContentAreaFilled(false);
        dayButton.setOpaque(true);
        dayButton.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        dayButton.setForeground(new java.awt.Color(240, 240, 240));
        dayButton.setText("DAY");
        dayButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        dayButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dayButtonActionPerformed(evt);
            }
        });

        settings.setIcon(new javax.swing.ImageIcon(getClass().getResource("/apptodate/images/wrench.png"))); // NOI18N
        settings.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        settings.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                settingsActionPerformed(evt);
            }
        });

        modifyAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/apptodate/images/add.png"))); // NOI18N
        modifyAdd.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        modifyAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                modifyAddActionPerformed(evt);
            }
        });

        yearLabel.setFont(new java.awt.Font("Tahoma", 0, 26)); // NOI18N
        yearLabel.setForeground(new java.awt.Color(240, 240, 240));
        yearLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);

        yearRightArrow.setBackground(new java.awt.Color(34, 34, 34));
        yearRightArrow.setForeground(new java.awt.Color(34, 34, 34));
        yearRightArrow.setIcon(new javax.swing.ImageIcon(getClass().getResource("/apptodate/images/right_arrow.png"))); // NOI18N
        yearRightArrow.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        yearRightArrow.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                yearRightArrowActionPerformed(evt);
            }
        });

        leftYearArrow.setBackground(new java.awt.Color(34, 34, 34));
        leftYearArrow.setForeground(new java.awt.Color(34, 34, 34));
        leftYearArrow.setIcon(new javax.swing.ImageIcon(getClass().getResource("/apptodate/images/left_arrow.png"))); // NOI18N
        leftYearArrow.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        leftYearArrow.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                leftYearArrowActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout titlePanelLayout = new javax.swing.GroupLayout(titlePanel);
        titlePanel.setLayout(titlePanelLayout);
        titlePanelLayout.setHorizontalGroup(
            titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(titlePanelLayout.createSequentialGroup()
                .addComponent(yearButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10)
                .addComponent(monthButton)
                .addGap(10, 10, 10)
                .addComponent(dayButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(leftYearArrow, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10)
                .addComponent(yearLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10)
                .addComponent(yearRightArrow, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(45, 45, 45)
                .addComponent(modifyAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(8, 8, 8)
                .addComponent(settings, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        titlePanelLayout.setVerticalGroup(
            titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(yearRightArrow, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, titlePanelLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(yearLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(yearButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(settings, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(modifyAdd, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(leftYearArrow, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(monthButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(dayButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        if(checkPink() == 1){
            monthButton.setBackground(new java.awt.Color(255, 9, 88));
        }else{
            monthButton.setBackground(new java.awt.Color(34, 34, 34));
        }
        if(checkPink() == 1){
            dayButton.setBackground(new java.awt.Color(255, 9, 88));
        }else{
            dayButton.setBackground(new java.awt.Color(34, 34, 34));
        }
        if(checkPink() == 1){
            settings.setIcon(new javax.swing.ImageIcon(getClass().getResource("/apptodate/images/pinkWrench.png"))); // NOI18N
        }
        if(checkPink() == 1){
            modifyAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/apptodate/images/pinkAdd.png"))); // NOI18N
        }
        yearLabel.setText(String.valueOf(getYear()));

        jPanel1.setBackground(new java.awt.Color(51, 61, 68));

        i = 0;
        for(int counter = 0; counter <= 41; counter++){
            d[counter] = getCalendarDay(counter, i);
        }
        janTable.setBackground(new java.awt.Color(34, 34, 34));
        janTable.setForeground(new java.awt.Color(240, 240, 240));
        removeZero();
        janTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
                {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
                {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
                {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
                {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
                {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
            },
            new String [] {
                dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
            }){
                boolean[] canEdit = new boolean [] {
                    false, false, false, false
                };
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit [columnIndex];
                }
            }

        );
        janTable.getTableHeader().setResizingAllowed(false);
        janTable.getTableHeader().setReorderingAllowed(false);
        jScrollPane1.setViewportView(janTable);
        if(checkPink() == 1){
            janTable.setBackground(new java.awt.Color(255, 9, 88));
        }else{
            janTable.setBackground(new java.awt.Color(34, 34, 34));
        }

        janLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        janLabel.setText(" JAN");
        janLabel.setOpaque(true);

        febLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        febLabel.setText(" FEB");
        febLabel.setOpaque(true);

        marLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        marLabel.setText(" MAR");
        marLabel.setOpaque(true);

        i = 1;
        for(int counter = 0; counter <= 41; counter++){
            d[counter] = getCalendarDay(counter, i);
        }
        febTable.setBackground(new java.awt.Color(34, 34, 34));
        febTable.setForeground(new java.awt.Color(240, 240, 240));
        removeZero();
        febTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
                {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
                {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
                {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
                {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
                {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
            },
            new String [] {
                dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
            }
        ){
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        }
    );
    febTable.getTableHeader().setResizingAllowed(false);
    febTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane2.setViewportView(febTable);
    if(checkPink() == 1){
        febTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        febTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    i = 2;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    marTable.setBackground(new java.awt.Color(34, 34, 34));
    marTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    marTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
    marTable.getTableHeader().setResizingAllowed(false);
    marTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane3.setViewportView(marTable);
    if(checkPink() == 1){
        marTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        marTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    aprLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    aprLabel.setText(" APR");
    aprLabel.setOpaque(true);

    i = 3;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    aprTable.setBackground(new java.awt.Color(34, 34, 34));
    aprTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    aprTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }
    );
    aprTable.getTableHeader().setResizingAllowed(false);
    aprTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane4.setViewportView(aprTable);
    if(checkPink() == 1){
        aprTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        aprTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    mayLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    mayLabel.setText(" MAY");
    mayLabel.setOpaque(true);

    junLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    junLabel.setText(" JUN");
    junLabel.setOpaque(true);

    i = 4;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    mayTable.setBackground(new java.awt.Color(34, 34, 34));
    mayTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    mayTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }
    );
    mayTable.getTableHeader().setResizingAllowed(false);
    mayTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane5.setViewportView(mayTable);
    if(checkPink() == 1){
        mayTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        mayTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    i = 5;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    junTable.setBackground(new java.awt.Color(34, 34, 34));
    junTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    junTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
    junTable.getTableHeader().setResizingAllowed(false);
    junTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane6.setViewportView(junTable);
    if(checkPink() == 1){
        junTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        junTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    julLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    julLabel.setText(" JUL");
    julLabel.setOpaque(true);

    i = 6;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    julTable.setBackground(new java.awt.Color(34, 34, 34));
    julTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    julTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }
    );
    julTable.getTableHeader().setResizingAllowed(false);
    julTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane7.setViewportView(julTable);
    if(checkPink() == 1){
        julTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        julTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    augLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    augLabel.setText(" AUG");
    augLabel.setOpaque(true);

    sepLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    sepLabel.setText(" SEP");
    sepLabel.setOpaque(true);

    i = 7;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    augTable.setBackground(new java.awt.Color(34, 34, 34));
    augTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    augTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }
    );
    augTable.getTableHeader().setResizingAllowed(false);
    augTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane8.setViewportView(augTable);
    if(checkPink() == 1){
        augTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        augTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    i = 8;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    sepTable.setBackground(new java.awt.Color(34, 34, 34));
    sepTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    sepTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }
    );
    sepTable.getTableHeader().setResizingAllowed(false);
    sepTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane9.setViewportView(sepTable);
    if(checkPink() == 1){
        sepTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        sepTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    octLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    octLabel.setText(" OCT");
    octLabel.setOpaque(true);

    i = 9;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    octTable.setBackground(new java.awt.Color(34, 34, 34));
    octTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    octTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }
    );
    octTable.getTableHeader().setResizingAllowed(false);
    octTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane10.setViewportView(octTable);
    if(checkPink() == 1){
        octTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        octTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    novLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    novLabel.setText(" NOV");
    novLabel.setOpaque(true);

    i = 10;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    novTable.setBackground(new java.awt.Color(34, 34, 34));
    novTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    novTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }
    );
    novTable.getTableHeader().setResizingAllowed(false);
    novTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane11.setViewportView(novTable);
    if(checkPink() == 1){
        novTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        novTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    i = 11;
    for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
    }
    decTable.setBackground(new java.awt.Color(34, 34, 34));
    decTable.setForeground(new java.awt.Color(240, 240, 240));
    removeZero();
    decTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {s[0], s[1], s[2], s[3], s[4], s[5], s[6]},
            {s[7], s[8], s[9], s[10], s[11], s[12], s[13]},
            {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
            {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
            {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
            {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
        },
        new String [] {
            dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
        }
    ){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }
    );
    decTable.getTableHeader().setResizingAllowed(false);
    decTable.getTableHeader().setReorderingAllowed(false);
    jScrollPane12.setViewportView(decTable);
    if(checkPink() == 1){
        decTable.setBackground(new java.awt.Color(255, 9, 88));
    }else{
        decTable.setBackground(new java.awt.Color(34, 34, 34));
    }

    decLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    decLabel.setText(" DEC");
    decLabel.setOpaque(true);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jPanel1Layout.createSequentialGroup()
            .addGap(25, 25, 25)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(janLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(10, 10, 10)
                    .addComponent(febLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(marLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(aprLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(mayLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(junLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(julLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(augLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(sepLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(octLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(novLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(decLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGap(25, 25, 25))
    );
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jPanel1Layout.createSequentialGroup()
            .addGap(20, 20, 20)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(janLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(febLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(marLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGap(0, 0, 0)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGap(16, 16, 16)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(aprLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(mayLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(junLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGap(0, 0, 0)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGap(16, 16, 16)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(julLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(augLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(sepLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGap(0, 0, 0)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGap(16, 16, 16)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(octLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(novLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(decLabel))
                    .addGap(0, 0, 0)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );

    jScrollPane13.setViewportView(jPanel1);
    if(checkPink() == 1){
        jPanel1.setBackground(new java.awt.Color(255, 174, 201));
    }else{
        jPanel1.setBackground(new java.awt.Color(34, 34, 34));
    }

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(titlePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 634, Short.MAX_VALUE)
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addComponent(titlePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 344, Short.MAX_VALUE))
    );

    if(checkPink() == 1){
        titlePanel.setBackground(new java.awt.Color(255, 174, 201));
    }else{
        titlePanel.setBackground(new java.awt.Color(34, 34, 34));
    }

    pack();
    setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void settingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_settingsActionPerformed
        // TODO add your handling code here:
         java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Settings().setVisible(true);
            }
        });
    }//GEN-LAST:event_settingsActionPerformed

    private void yearRightArrowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_yearRightArrowActionPerformed
        // TODO add your handling code here:
        year = year + 1;
        yearLabel.setText(String.valueOf(year));
        String[] dow = new String[7]; //Days of Week
        if(getStartingWeek() == 0){
            dow[0] = "Sn";
            dow[1] = "M";
            dow[2] = "T";      
            dow[3] = "W";
            dow[4] = "Th";      
            dow[5] = "F";       
            dow[6] = "S";       
        }else if(getStartingWeek() == 1){
            dow[0] = "M";
            dow[1] = "T";
            dow[2] = "W";      
            dow[3] = "Th";
            dow[4] = "F";      
            dow[5] = "S";       
            dow[6] = "Sn";  
        }else if(getStartingWeek() == 2){
            dow[0] = "T";
            dow[1] = "W";
            dow[2] = "Th";      
            dow[3] = "F";
            dow[4] = "S";      
            dow[5] = "Sn";       
            dow[6] = "M";  
        }else if(getStartingWeek() == 3){
            dow[0] = "W";
            dow[1] = "Th";
            dow[2] = "F";      
            dow[3] = "S";
            dow[4] = "Sn";      
            dow[5] = "M";       
            dow[6] = "T";  
        }else if(getStartingWeek() == 4){
            dow[0] = "Th";
            dow[1] = "F";
            dow[2] = "S";      
            dow[3] = "Sn";
            dow[4] = "M";      
            dow[5] = "T";       
            dow[6] = "W";  
        }else if(getStartingWeek() == 5){
            dow[0] = "F";
            dow[1] = "S";
            dow[2] = "Sn";      
            dow[3] = "M";
            dow[4] = "T";      
            dow[5] = "W";       
            dow[6] = "Th";  
        }else if(getStartingWeek() == 6){
            dow[0] = "S";
            dow[1] = "Sn";
            dow[2] = "M";      
            dow[3] = "T";
            dow[4] = "W";      
            dow[5] = "Th";       
            dow[6] = "F";  
        }
        i = 0;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        janTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );

        
        i = 1;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        febTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
        new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 2;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        marTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 3;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        aprTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 4;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        mayTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );       
        
        i = 5;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        junTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    ); 
        
        i = 6;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        julTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );       

        i = 7;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        augTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 8;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        sepTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );       
        
        i = 9;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        octTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );      
        
        i = 10;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        novTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );      
        
        i = 11;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        decTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );       

    }//GEN-LAST:event_yearRightArrowActionPerformed

    private void leftYearArrowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_leftYearArrowActionPerformed
        // TODO add your handling code here:
        year = year - 1;
        yearLabel.setText(String.valueOf(year));
                String[] dow = new String[7]; //Days of Week
        if(getStartingWeek() == 0){
            dow[0] = "Sn";
            dow[1] = "M";
            dow[2] = "T";      
            dow[3] = "W";
            dow[4] = "Th";      
            dow[5] = "F";       
            dow[6] = "S";       
        }else if(getStartingWeek() == 1){
            dow[0] = "M";
            dow[1] = "T";
            dow[2] = "W";      
            dow[3] = "Th";
            dow[4] = "F";      
            dow[5] = "S";       
            dow[6] = "Sn";  
        }else if(getStartingWeek() == 2){
            dow[0] = "T";
            dow[1] = "W";
            dow[2] = "Th";      
            dow[3] = "F";
            dow[4] = "S";      
            dow[5] = "Sn";       
            dow[6] = "M";  
        }else if(getStartingWeek() == 3){
            dow[0] = "W";
            dow[1] = "Th";
            dow[2] = "F";      
            dow[3] = "S";
            dow[4] = "Sn";      
            dow[5] = "M";       
            dow[6] = "T";  
        }else if(getStartingWeek() == 4){
            dow[0] = "Th";
            dow[1] = "F";
            dow[2] = "S";      
            dow[3] = "Sn";
            dow[4] = "M";      
            dow[5] = "T";       
            dow[6] = "W";  
        }else if(getStartingWeek() == 5){
            dow[0] = "F";
            dow[1] = "S";
            dow[2] = "Sn";      
            dow[3] = "M";
            dow[4] = "T";      
            dow[5] = "W";       
            dow[6] = "Th";  
        }else if(getStartingWeek() == 6){
            dow[0] = "S";
            dow[1] = "Sn";
            dow[2] = "M";      
            dow[3] = "T";
            dow[4] = "W";      
            dow[5] = "Th";       
            dow[6] = "F";  
        }
        i = 0;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        janTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 1;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        febTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 2;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        marTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 3;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        aprTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 4;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        mayTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );

        i = 5;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        junTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 6;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        julTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );       

        i = 7;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        augTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );
        
        i = 8;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        sepTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );        
        
        i = 9;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        octTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );       
        
        i = 10;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        novTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );       
        
        i = 11;
        for(int counter = 0; counter <= 41; counter++){
        d[counter] = getCalendarDay(counter, i);
        }
        removeZero();
        decTable.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
        {s[0],  s[1],  s[2],  s[3],  s[4],  s[5],  s[6]},
        {s[7],  s[8],  s[9],  s[10], s[11], s[12], s[13]},
        {s[14], s[15], s[16], s[17], s[18], s[19], s[20]},
        {s[21], s[22], s[23], s[24], s[25], s[26], s[27]},
        {s[28], s[29], s[30], s[31], s[32], s[33], s[34]},
        {s[35], s[36], s[37], s[38], s[39], s[40], s[41]}
    },
    new String [] {
        dow[0],dow[1],dow[2],dow[3],dow[4],dow[5],dow[6]
    }){
        boolean[] canEdit = new boolean [] {
            false, false, false, false
        };
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    }

    );       
    }//GEN-LAST:event_leftYearArrowActionPerformed
    
    private void monthButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_monthButtonActionPerformed
        // TODO add your handling code here:
        close();
        MonthlyView mv = new MonthlyView();
        mv.setVisible(true);
    }//GEN-LAST:event_monthButtonActionPerformed

    private void modifyAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_modifyAddActionPerformed
        // TODO add your handling code here:
         java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ModifyAdd().setVisible(true);
            }
        });
    }//GEN-LAST:event_modifyAddActionPerformed

    private void yearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_yearButtonActionPerformed
        // TODO add your handling code here:
        
    }//GEN-LAST:event_yearButtonActionPerformed

    private void dayButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dayButtonActionPerformed
        // TODO add your handling code here:
        close();
        DailyView dV = new DailyView();
        dV.setVisible(true);
    }//GEN-LAST:event_dayButtonActionPerformed

    private int checkPink(){
        Path path = Paths.get("");
        Path realPath;
        int check = 0;
        try {
            realPath = path.toRealPath(LinkOption.NOFOLLOW_LINKS);
            stringPath = realPath.toString();
            stringPath = stringPath.replace("\\","\\\\");
        } catch (IOException ex) {
            Logger.getLogger(Settings.class.getName()).log(Level.SEVERE, null, ex);
        }
        File pink = new File(stringPath + "\\AppToDate\\pink.txt");
        if(pink.exists()){
            check = 1;
        }
        return check;
    }
    private int getYear() {
        GregorianCalendar cal = new GregorianCalendar();
        year = cal.get(Calendar.YEAR);
        return year;
    }

private int getCalendarDay(int dayButton ,int i){
    String stringYear = yearLabel.getText();
    int intYear = Integer.parseInt(stringYear);
    int addNum = 0;
    GregorianCalendar cal = new GregorianCalendar();
    Date date = new Date(intYear, i, 1);
    cal.setTime(date);
    
    int max = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
    Calendar c = Calendar.getInstance();
    c.set(intYear, i, 1);
    int day = c.get(Calendar.DAY_OF_WEEK);
    int store[] = new int[42];
    
    day = day - 1;
    if(day - getStartingWeek() > 0){
       day = day - getStartingWeek(); 
    }else if(day - getStartingWeek() < 0){
       day = 7 + (day - getStartingWeek());
    }else if(day - getStartingWeek() == 0){
        day = 0;
    }
    
    int counter = 0;
        while(counter < day){
        store[counter] = 0; 
        counter++;
        }
        
        for(int j = 1; j <= max; j++){
            store[counter] = j;
            counter++;
        }
        
        while(counter <= 41){
            store[counter] = 0;
            counter++;
            addNum++;
        }
    return store[dayButton];
}
    
    private void close(){
        this.dispose();
    }
    
    private void removeZero(){
        for(int counter = 0; counter < 42; counter++){
            s[counter] = Integer.toString(d[counter]);
        }
        for(int counter = 0; counter < 42; counter++){
            if(d[counter] == 0){
            s[counter] = null;
            }
        }
    }
    
    private int getStartingWeek(){
        Path path = Paths.get("");
        Path realPath;
        int weekCounter = 0;
        try {
            realPath = path.toRealPath(LinkOption.NOFOLLOW_LINKS);
            stringPath = realPath.toString();
            stringPath = stringPath.replace("\\","\\\\");
        } catch (IOException ex) {
            Logger.getLogger(Settings.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        for(int counter = 0; counter < 7; counter++){
        File week = new File(stringPath + "\\AppToDate\\" + counter + ".txt");
        if(week.exists()){
           weekCounter = counter;
        }
        }
        return weekCounter;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(YearlyView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(YearlyView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(YearlyView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(YearlyView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new YearlyView().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel aprLabel;
    private javax.swing.JTable aprTable;
    private javax.swing.JLabel augLabel;
    private javax.swing.JTable augTable;
    private javax.swing.JButton dayButton;
    private javax.swing.JLabel decLabel;
    private javax.swing.JTable decTable;
    private javax.swing.JLabel febLabel;
    private javax.swing.JTable febTable;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JLabel janLabel;
    private javax.swing.JTable janTable;
    private javax.swing.JLabel julLabel;
    private javax.swing.JTable julTable;
    private javax.swing.JLabel junLabel;
    private javax.swing.JTable junTable;
    private javax.swing.JButton leftYearArrow;
    private javax.swing.JLabel marLabel;
    private javax.swing.JTable marTable;
    private javax.swing.JLabel mayLabel;
    private javax.swing.JTable mayTable;
    private javax.swing.JButton modifyAdd;
    private javax.swing.JButton monthButton;
    private javax.swing.JLabel novLabel;
    private javax.swing.JTable novTable;
    private javax.swing.JLabel octLabel;
    private javax.swing.JTable octTable;
    private javax.swing.JLabel sepLabel;
    private javax.swing.JTable sepTable;
    private javax.swing.JButton settings;
    private javax.swing.JPanel titlePanel;
    private javax.swing.JButton yearButton;
    private javax.swing.JLabel yearLabel;
    private javax.swing.JButton yearRightArrow;
    // End of variables declaration//GEN-END:variables
}
